package tcu.se.SpringAOP.aop;

import org.aspectj.lang.annotation.*;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

//  增强的类
@Aspect
@Component
@Order(1)
public class UserProxy {
    @Pointcut(value = "execution(* tcu.se.SpringAOP.aop.User.add(..))")
    public void pointDome(){

    }
    //  前置通知
    @Before(value = "pointDome()")
    public void before(){
        System.out.println("before.....");
    }

    @After(value = "pointDome()")
    public void after(){
        System.out.println("after.....");
    }

    @AfterReturning(value = "pointDome()")
    public void afterReturning(){
        System.out.println("AfterReturning.....");
    }

}
